package uk.ac.ebi.bioinvindex.model.impl.processing;

import uk.ac.ebi.bioinvindex.model.impl.term.Instrument;
import uk.ac.ebi.bioinvindex.model.impl.term.Vendor;

import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Jan 21, 2008
 */
@Embeddable
public class Platform {

	private Vendor vendor;

	private Instrument instrument;

	public Platform() {
	}

	public Platform(Vendor vendor, Instrument instrument) {
		this.vendor = vendor;
		this.instrument = instrument;
	}


	@ManyToOne(
			targetEntity = Vendor.class)
	@JoinColumn(table = "ASSAY", name = "platform_vendor", nullable = false)
	public Vendor getVendor() {
		return vendor;
	}

	public void setVendor(Vendor vendor) {
		this.vendor = vendor;
	}

	@ManyToOne(
			targetEntity = Instrument.class)
	@JoinColumn(table = "ASSAY", name = "platform_instrument", nullable = false)
	public Instrument getInstrument() {
		return instrument;
	}

	public void setInstrument(Instrument instrument) {
		this.instrument = instrument;
	}
}

